package com.ymatou.iapi.sellerproduct.service;

import java.util.Arrays;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.JsonBeanHelper;
import com.ymttest.utils.MapUtil;

public class GetSellerProductListCall extends YmatouAutoTestCall{
	private static String opurl ="/api/SellerProduct/GetSellerProductList";

	public GetSellerProductListCall() {
		super(EnvSetup.getSystemUrl("sellerproduct_iapi"),opurl,"POST","JSON");
	}
	
	
	public JSONObject SearchBySellerIdAndProdList(int sellerId, List<String> prodList){
		JSONObject requestBean = this.getJsonBean(null);
		
		JsonBeanHelper.updateJsonBean(requestBean, MapUtil.hashMap("ProductIdList", new JSONArray(prodList),"SellerId",sellerId));
		
		return callAndGetReturnData(requestBean);
	}
	
	
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json");
	}
	
	
	public static void main(String[] args) {
		GetSellerProductListCall aCall = new GetSellerProductListCall();
		aCall.SearchBySellerIdAndProdList(3383, Arrays.asList(""));
	}
}
